package com.bigfish.controller;

import com.bigfish.utils.R;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/coupon/coupon")
public class CouponController {

    @RequestMapping("/member/list")
    public R membersCoupons() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (int i = 1; i <= 100; i++) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", "满100减" + i);
            map.put("id", i);
            list.add(map);
        }
        return R.ok().put("coupons", list);
    }
}
